package issr.entity;
// Generated 27-set-2012 19.32.49 by Hibernate Tools 3.2.1.GA

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Log generated by hbm2java
 */
@Entity
@Table(name = "log", catalog = "issr")
public class Log implements java.io.Serializable {

    private Integer id;
    private Utente getUtente;
    private Puntovendita puntovendita;
    private Date entrytime;
    private String entry;

    public Log() {
    }

    public Log(Utente getUtente, Date entrytime) {
        this.getUtente = getUtente;
        this.entrytime = entrytime;
    }

    public Log(Utente getUtente, Date entrytime, String entry) {
        this.getUtente = getUtente;
        this.puntovendita = getUtente.getPuntovendita();
        this.entrytime = entrytime;
        this.entry = entry;
    }

    public Log(Utente getUtente, Puntovendita puntovendita, Date entrytime, String entry) {
        this.getUtente = getUtente;
        this.puntovendita = puntovendita;
        this.entrytime = entrytime;
        this.entry = entry;
    }

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "utente", nullable = false)
    public Utente getGetUtente() {
        return this.getUtente;
    }

    public void setGetUtente(Utente getUtente) {
        this.getUtente = getUtente;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "pv")
    public Puntovendita getPuntovendita() {
        return this.puntovendita;
    }

    public void setPuntovendita(Puntovendita puntovendita) {
        this.puntovendita = puntovendita;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "entrytime", nullable = false, length = 19)
    public Date getEntrytime() {
        return this.entrytime;
    }

    public void setEntrytime(Date entrytime) {
        this.entrytime = entrytime;
    }

    @Column(name = "entry")
    public String getEntry() {
        return this.entry;
    }

    public void setEntry(String entry) {
        this.entry = entry;
    }
}
